@echo off
cd %BUILD_PATH%
@echo         preverifying...
%WTK%\bin\preverify1.1.exe -d %PREVERIFIED_PATH% -classpath %WTK_LIBS% %CLASS_PATH%
cd %PREVERIFIED_PATH%
@echo         updating manifest...
echo Manifest-Version: 1.0> MANIFEST.MF
echo Created-By: 1.4.2_16 (Sun Microsystems Inc.)>> MANIFEST.MF
echo MIDlet-Name: %MIDLET_NAME%>>MANIFEST.MF
echo MIDlet-Vendor: %VENDOR%>>MANIFEST.MF
echo MIDlet-1: %MIDLET_NAME%, , %MAIN_CLASS_NAME%>>MANIFEST.MF
echo MIDlet-Version: %VER_MAJ%.%VER_MID%.%VER_MIN%>>MANIFEST.MF
echo MicroEdition-Profile: MIDP-2.0>>MANIFEST.MF
echo MicroEdition-Configuration: CLDC-1.1>>MANIFEST.MF
@echo         making jar file...
set WIDTH=%1
set HEIGHT=%2
copy /y %DATA_PATH%\..\bup_data\splash_1_%WIDTH%x%HEIGHT%.png %DATA_PATH%\splash_1.png > NUL
copy /y %DATA_PATH%\*.* > NUL
%JSDK%\bin\jar -cfm %PRJ_NAME%.jar MANIFEST.MF *.*
@echo         copying to release directory...
copy /y %PRJ_NAME%.jar %RELEASE_PATH%\%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jar > NUL
if errorlevel 1 (
copy /y %PRJ_NAME%.jar %RELEASE_PATH%\%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jar
)
@echo         updating jad...
del /Q %RELEASE_PATH%\%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jad > NUL 
cd %RELEASE_PATH%
echo MIDlet-Name: %MIDLET_NAME%>>%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jad
echo MIDlet-Vendor: %VENDOR%>>%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jad
echo MIDlet-1: %MIDLET_NAME%, , %MAIN_CLASS_NAME%>>%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jad
echo MIDlet-Version: %VER_MAJ%.%VER_MID%.%VER_MIN%>>%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jad
echo MIDlet-Description: %MIDLET_DESCRIPTION%>>%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jad
echo MIDlet-Jar-URL: %PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jar>>%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jad
@echo         updating jar size in jad...
cd %TOOLS_PATH%\jarSize
%JSDK%\bin\java jarSize %RELEASE_PATH%\%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jar %RELEASE_PATH%\%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jad
cd %PREVERIFIED_PATH%
del *.jar
